import axios from '@/api'

/******************* 列表 *******************/
export function declarationSave(params) {
	 let config = {
	        headers: {'Content-Type': 'multipart/form-data'}
	      }
    return axios.request({
        url: '/declaration/save',
        method: 'post',
        data: params,
		config:config
    });
	//  let config = {
	//         headers: {'Content-Type': 'multipart/form-data'}
	//       }
	// axios.post('/declaration/save',params,config).then(res => {
 //          console.log(res.data)
 //        })
	
	
}

/******************* 上线的卡券 *******************/
export function listOnMarket(params) {
    return axios.request({
        url: '/laundry/cards/findAllIsMarket',
        method: 'post',
        data: params
    });
}

/******************* 详情 *******************/
export function info(id) {
    return axios.request({
        url: '/laundry/cards/findById/' + id,
        method: 'get'
    });
}

/******************* 添加 *******************/
export function add(data) {
    return axios.request({
        url: '/laundry/cards/save',
        method: 'post',
        data: data
    });
}

/******************* 编辑 *******************/
export function update(data) {
    return axios.request({
        url: '/laundry/cards/modify',
        method: 'put',
        data: data,

    });
}

/******************* 删除 *******************/
export function del(id) {
    return axios.request({
        url: '/laundry/cards/removeById/'+id,
        method: 'delete'
    });
}
